<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../EaselJS/lib/easeljs-0.8.2.min.js"></script>
</head>
<body>
<canvas id="myCanvas" width="350" height="400">
    easeljs简单使用
</canvas>
    <script type="text/javascript">
        window.onload=function(){
            var canvas = document.getElementById("myCanvas");
            var stage = new createjs.Stage(canvas);
            function drawText(){
                for(var i=0;i<100;i++){
                    var theText = new createjs.Text("好贷前端","normal 32px microsoft yahei","#222222");
                    theText.x = Math.floor(Math.random() * 350);
                    theText.y = Math.floor(Math.random() * 400);
                    theText.rotation = Math.floor(Math.random() * 360);
                    theText.alpha = Math.random() * 1;
                    theText.color = "#"+Math.floor(Math.random()*16777215).toString(16);
                    stage.addChild(theText);
                    stage.update();
                }
            }
            //生成文字
            drawText();

        }
    </script>
</body>
</html>